export const security_routes =
  {
    name: 'security',
    path: "/security",
    alias: "/securityManage",
    component: () => import('@/views/layout/layout'),
    meta: {
      auth: {//不配置时不受权限控制(必须配合security插件使用)
        code: 'security',
        model: 'page',
      },
      container: false, //redirect时使用
      keep: { //(必须配合keepView组件使用)
        alive: true, //是否需要缓存
        state: true, //activated时是否保留状态刷新
      },
      menu: { //不配置时不计入菜单(必须配合IterateMenu组件使用)
        title: '安全管理',
        icon: 'el-icon-setting', //菜单中图标
        hidden: false //菜单中是否显示
      },
      style: {//不配置时不设置容器样式(在layout组件中有使用)
        backgroundImage: ''
      }
    },
    //层级路由时需要使用组件 component: () => import('@/views/layout/keepView'),
    children: [
      {
        name: 'securityPermission',
        path: "/permission",
        component: () => import('@/views/security/permission/tree'),
        meta: {
          auth: {
            code: 'security:permission',
            model: 'page',
            children: [
              {code: 'security:permission:add', model: 'button', name: '添加按钮'},
              {code: 'security:permission:del', model: 'button', name: '删除按钮'},
              {code: 'security:permission:edit', model: 'button', name: '编辑按钮'},
              /*{code:'security:permission:search',model:'button',name:'搜索按钮'},*/
            ],
          },
          keep: {
            alive: true,
            state: true,
          },
          menu: {
            title: '资源',
            icon: 'el-icon-setting',
            hidden: false
          },
          style: {
            backgroundImage: ''
          },
        }
      },
      {
        name: 'securityRouter',
        path: '/securityRouter',
        component: () => import('@/views/security/components/RouterMenu'),
        meta: {
          auth: {
            code: 'security:router',
            model: 'page',
          },
          keep: {
            alive: true,
            state: true,
          },
          menu: {
            title: '路由菜单',
            icon: 'el-icon-more',
            hidden: false
          },
        }
      },
      {
        name: 'securityRole',
        path: "/role",
        component: () => import('@/views/security/role/tree'),
        meta: {
          auth: {
            code: 'security:role',
            model: 'page',
            children: [
              {code: 'security:role:add', model: 'button', name: '添加按钮'},
              {code: 'security:role:del', model: 'button', name: '删除按钮'},
              {code: 'security:role:edit', model: 'button', name: '编辑按钮'},
              /*{code:'security:role:search',model:'button',name:'搜索按钮'},*/
            ],
          },
          keep: {
            alive: true,
            state: true,
          },
          menu: {
            title: '角色',
            icon: 'el-icon-setting',
            hidden: false
          },
          style: {
            backgroundImage: ''
          },
        }
      },
    ]
  }
